package org.strieber.fca;

import java.io.File;
import java.util.List;

public class TestSubAndInt {

	static String testFileName = "rulesINTSUB.txt";
	static String inputFileNameCAT = "resultsCAT.txt";
	static String saveFileName = "resultsINTSUB.txt";
	
	public static void main(String[] args) throws Exception {
		
		File inputFile = new File(inputFileNameCAT);
		
		ResultsTrimmer rt = new ResultsTrimmer(inputFile);
		
		rt.pruneByMinSupport(10);
		rt.pruneByMinConfidence(75);
		rt.pruneByExactNumberOfExtents(2);
		rt.pruneByExactNumberOfIntents(1);
		rt.pruneByRequiredIntent("CAT");
		
		rt.printAllRules();
		
		List<String> rulesAsStrings = rt.getRulesAsStrings();
		
		for (int i = 0; i < rulesAsStrings.size(); i ++) {
			System.out.println(rulesAsStrings.get(i));
		}
		
		KevinSort ks = new KevinSort(rulesAsStrings);
		ks.run(3);
		
	}
}